package com.byf.product;

import com.byf.common.core.constant.ServiceNameConstants;
import com.byf.common.core.domain.Result;
import com.byf.product.domain.PmsSkuInfo;
import com.byf.product.domain.PmsSkuSaleAttrValue;
import com.byf.product.factory.RemotePmsSkuInfoFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

import static com.byf.common.core.domain.Result.success;

/**
 * 用户服务
 *
 * @author byf
 */
@FeignClient(contextId = "remotePmsSkuInfoService", value = ServiceNameConstants.PRODUCT_SERVICE, fallbackFactory = RemotePmsSkuInfoFallbackFactory.class)
public interface RemotePmsSkuInfoService
{

    /**
     * 获取sku信息详细信息
     */
    @GetMapping(value = "/pmsSkuInfo/{skuId}")
    public Result<PmsSkuInfo> getInfo(@PathVariable("skuId") Long skuId);

    /**
     * 查询sku属性信息列表
     */
    @PostMapping("/pmsSkuInfo/selectPmsSkuSaleAttrValueList")
    public Result<List<PmsSkuSaleAttrValue>> selectPmsSkuSaleAttrValueList(PmsSkuSaleAttrValue pmsSkuSaleAttrValue);
}
